<?php
require_once 'Zend/Application/Resource/ResourceAbstract.php';
require_once 'Bitly/Service.php';

/**
 * Resource for initializing a bitly resource.
 * 
 * @see https://github.com/facebook/php-sdk
 */
class Core_Application_Resource_Bitly
	extends Zend_Application_Resource_ResourceAbstract
{
	/**
	 * Defined by Zend_Application_Resource_Resource
	 *
	 * @return Facebook
	 */
	public function init()
	{
		$options = $this->getOptions();
		$bitly = new Bitly_Service($options['username'], $options['apikey']);
		return $bitly;
	}
}